package com.bm.server.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import com.bm.server.service.intf.ActivityService;
import com.bm.server.vo.R;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/activity")
@Api(tags ="活动相关的操作-张宇坤")
@CrossOrigin
public class ActivityController {
    @Resource
    private ActivityService service;
   
    @ApiOperation(value = "查看所有活动")
    @GetMapping("/all.do")
    public R all(){
        return service.all();
    }
    @ApiOperation(value = "查看单个活动")
    @GetMapping("/one.do")
    public R one(@RequestParam int id){
        return service.one(id);
    }
}
